package com.example.xuanmei.video.repository;

import com.example.xuanmei.video.entity.Video;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface VideoRepository extends JpaRepository<Video, Long> {
    Page<Video> findByUserId(Long userId, Pageable pageable);
    Page<Video> findByCategory(String category, Pageable pageable);
    Page<Video> findAllByOrderByCreateTimeDesc(Pageable pageable);
}
